package com.liu.seckill.util;

import org.springframework.util.StringUtils;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 * @ClassName ValidatorUtil
 * @Author ：name
 * @Date ：2022-02-14 16:56
 * @Description：
 * @Version: 1.0
 */
public class ValidatorUtil {

    public static final Pattern mobile_pattern=Pattern.compile("[1]([3-9])[0-9]{9}$");

    public static boolean isMobile(String moile){
        if(StringUtils.isEmpty(moile)){
            return false;
        }
        Matcher matcher=mobile_pattern.matcher(moile);
        return matcher.matches();
    }
}
